<?php
/**
 *       _____
 *      /  \  \      _       _    _____________   ___     ___ '  TM
 *     / /\ \  \    | |\    | |\ /_____   _____\ | - |   | - |
 *    / /  \ \  \   | | |   | | ||____/| |\____| | - |___| - |
 *   / /   /\ \  \  | | |   | | |    | | | |     | -  ___  - |
 *  / /   /  \ \  \ | |_|___| | |    | |_| |     | - |   | - |
 * / /___/    \ \__\|________ |/     |/___\|     |___|   |___|
 *________________________________________________________________________

 * Prend les infos du visiteur en cours
 *
 * PHP version 5
 *
 * LICENSE: GNU General Public License v3
 *
 * @category
 * @package
 * @author     Charly Poly <CharlyPoly@gmail.com>
 * @copyright  2009 Authentic Development Group
 * @license    GNU General Public License v3
 * @since      File available since Release 0.1.0
 */

class Icatch {
    public static function catchUser() {
        $info = "( ";
        $info .= "ip : ".(isset($_SERVER['REMOTE_ADDR']) ? ip2long($_SERVER['REMOTE_ADDR']) : $_SERVER['X-Forwarded-For']);
        $info .= " | host :" . (isset($_SERVER['REMOTE_HOST']) ? ip2long($_SERVER['REMOTE_ADDR']) : gethostbyaddr($_SERVER['REMOTE_ADDR']));
        $info .= " )";
        return $info;
    }
}
?>
